package com.android.demo.activity;

import java.util.HashMap;

import android.content.Intent;

public class BTProtocolAdapter {
	
//	HashMap<Integer, String> commandActionMap = new HashMap<Integer, String>();
	
//	BTProtocolAdapter() {
//		
//	}
	public final static String INCOMING_CALL = "action.kcom.bt.incomingcall"; 
	public final static String MATCH_FAIL = "action.kcom.bt.incomingcall";
	
	public Intent analyze(String content){
		Intent retIntent = null;
		String command = content.substring(0, 2);
		content = content.substring(2);
			if(command.equals("ID")){
				Intent intent = new Intent(INCOMING_CALL);
				intent.putExtra("bt_content", content);
			}else if(command.equals("QC")){
				Intent intent = new Intent(MATCH_FAIL);
				intent.putExtra("bt_content", content);
			}
		
		return retIntent;
	}
}
